import 'log/LogUtil.dart';

class Utils{
  
  static String formatSecond(int seconds){
    return '${(seconds ~/ 60).toString().padLeft(2, '0')}:${((seconds % 60).toString().padLeft(2, '0'))}';
  }
  static int getDays(int year, int month){
    LogUtil.println('year $year month $month');
    switch(month){
      case 1:
      case 3:
      case 5:
      case 7:
      case 8:
      case 10:
      case 12:
        return 31;
      case 2:
        return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) ? 29 : 28;
      case 4:
      case 6:
      case 9:
      case 11:
      default:
        return 30;
    }
  }


}